﻿@model sipfe.model.dataAccess.SIPMaeSolicitud
@using Resources;
@{
    Layout = "~/Views/Shared/Layaout/general/_LayoutGeneral.cshtml";
    string clase = @ViewBag.clase;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.personaJS)" ></script> 
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.autocompleteJS)" ></script> 
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.calendarioJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.validatelJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.unobtrusiveJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.mantePersonaJS)"></script>
<script type="text/javascript">
    $(function () {
        calendarioFuturo1('dIniActividad', '1');
        calendarioFuturo1('dFinActividad', '1');
        //function setAutoAyudaEmpresa(nIdeEmpresa, nIdeCodPaisDoc, nIdeTipoDocum, nameCampoAuto, pURL, sw) {
        setAutoAyudaEmpresa("#nIdeEmpresa", "#nIdeCodPaisDoc", "#nIdeTipoDocum", "#vNumDocum", "#vNombres", "/AutoAyuda/ListaEmpresaAuto", "1");
        setAutoAyudaEmpresa("#nIdeEmpresa", "#nIdeCodPaisDoc", "#nIdeTipoDocum", "#vNombres", "#vNumDocum", "/AutoAyuda/ListaEmpresaAuto", "2");

        setAutoAyudaEmpresa("#nIdeInstitucion", "#nIdeCodPaisDocInst", "#nIdeTipoDocumInst", "#vNumDocumInst", "#vNombresInst", "/AutoAyuda/ListaEmpresaAuto", "1");
        setAutoAyudaEmpresa("#nIdeInstitucion", "#nIdeCodPaisDocInst", "#nIdeTipoDocumInst", "#vNombresInst", "#vNumDocumInst", "/AutoAyuda/ListaEmpresaAuto", "2");

        setAutoAyudaEmpresa("#nIdePersonSolicita", "#nIdeCodPaisDocSol", "#nIdeTipoDocumSol", "#vNumDocumSol", "#vNombresSol", "/AutoAyuda/ListaPersonaAuto", "1");
        setAutoAyudaEmpresa("#nIdePersonSolicita", "#nIdeCodPaisDocSol", "#nIdeTipoDocumSol", "#vNombresSol", "#vNumDocumSol", "/AutoAyuda/ListaPersonaAuto", "2");

        setAutoAyudaEmpresa("#sipDetVinculoPersona2_nIdePersona", "#nIdeCodPaisDocVin", "#nIdeTipoDocumVin", "#vNumDocumVin", "#vNombresVin", "/AutoAyuda/ListaPersonaAuto", "1");
        setAutoAyudaEmpresa("#sipDetVinculoPersona2_nIdePersona", "#nIdeCodPaisDocVin", "#nIdeTipoDocumVin", "#vNombresVin", "#vNumDocumVin", "/AutoAyuda/ListaPersonaAuto", "2");
        //  setAutoAyudaEmpresa("#nIdePersonSolicita", "#nIdeCodPaisDocSol", "#nIdeTipoDocumSol", "#vNombresSol", "#vNumDocumSol", "/AutoAyuda/ListaPersonaAuto", "2");
    });
    
</script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.nuevoJS)" ></script>
<div id="dialog-modal" title="INGRESE LOS CAMPOS OBLIGATORIOS"></div>

<center>
     @using (Html.BeginForm("AddNuevaSolcitud", "Nuevo", FormMethod.Post))
     {
    <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0" class="tituloWhite8">
        <tr>
            <td style="width:15%">&nbsp;</td>
            <td style="width:25%" align="left">Clase de Solicitud:              
              @Html.DropDownList("nIdeClaseSolicitud", (IEnumerable<SelectListItem>)ViewBag.Clase_Tramite)
            </td>
            <td style="width:60%" align="right">@ViewBag.TITULO</td>
        </tr>
    </table>
         <br/> 
         <fieldset style="width: 750px;" class="fieldsetStyle1">
        <legend class="tituloBlue9">DATOS DE LA ENTIDAD FINANCIADORA / GESTIONADORA</legend>
        <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td>
                        @Html.DropDownList("nIdeEmpresa", (IEnumerable<SelectListItem>)ViewBag.EmpresaEstrategica, "--Seleccione--")
                    </td>
                </tr>
            </tbody>
        </table>
    </fieldset>         
    <br />
 @Html.ValidationSummary(false, "Los Siguientes Campos son Obligatorios:")
    <fieldset style="width: 750px;" class="fieldsetStyle1">
        <legend class="tituloBlue9">DATOS DE LA SOLICITUD</legend>        
        <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
            <tbody>                
                <tr>
                    <td>
                        <table border="0" cellpadding="1" cellspacing="0" width="100%">
                        <tbody class="tituloCelesteN8">                            
                            <tr>
                                <td>País Emisor<span class="asterisco">(*)</span></td>
                                <td>Tipo documento<span class="asterisco">(*)</span></td>
                                <td>Número documento<span class="asterisco">(*)</span></td>
                                <td colspan ="3" align="left">Nombre de la Institución donde Cursará el Programa<span class="asterisco">(*)</span></td>                                
                            </tr>
                            <tr>
                               
                                <td>
                                    @Html.DropDownList("nIdeCodPaisDocInst", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor)
                                </td>
                                <td>
                                    @Html.DropDownList("nIdeTipoDocumInst", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--")
                                </td>
                                <td>
                                    @Html.TextBox("vNumDocumInst", null, new { style = "width:100px;", maxlength = 120 })
                                </td>
                                <td colspan ="3" align="left">
                                    @Html.TextBox("vNombresInst", null, new { style = "width:300px;", maxlength = 120 })
                                </td>
                            </tr>
                            <tr>
                                <td>Nivel de Estudio<span class="asterisco">(*)</span></td>
                                <td>Concepto/Especialidad<span class="asterisco">(*)</span></td>
                                <td>Modalidad Estudio<span class="asterisco">(*)</span></td>                                
                                <td align="left">Incio Actividad<span class="asterisco">(*)</span></td>
                                <td>Fin Actividad<span class="asterisco">(*)</span></td>
                                <td>Duración Actividad<span class="asterisco">(*)</span></td>  
                            </tr>
                            <tr>                                
                                <td>
                                    @Html.HiddenFor(model => model.nIdeInstitucion)
                                    @Html.DropDownList("nIdeNivelEstudio", (IEnumerable<SelectListItem>)ViewBag.NivelEstudio, "--Seleccione--", new { onchange = "javascript:cargaConcepto(this,'1');" })
                                </td>
                                <td>
                                    <div id="divConcepto">
                                        <select id="nIdeConcepto" name="nIdeConcepto" style="width:200px;" >
                                            <option value="">--Seleccione--</option>
                                        </select>
                                    </div>
                                </td>
                                <td>
                                    @Html.DropDownList("nIdeModEstudio", (IEnumerable<SelectListItem>)ViewBag.ModalidadEstudio, "--Seleccione--")
                                </td>                                
                                <td align="left">
                                    @Html.TextBoxFor(model => model.dIniActividad, new { style = "width:60px;", maxlength = 10, onkeyup="javascript:setFechaCaja(this);", onkeypress = "return validarCharFecha(event);", onblur="javascript:ValDateTextNew(this);" })
                                </td>
                                <td>
                                    @Html.TextBoxFor(model => model.dFinActividad, new { style = "width:60px;", maxlength = 10, onkeyup="javascript:setFechaCaja(this);", onkeypress = "return validarCharFecha(event);", onblur="javascript:ValDateTextNew(this);" })
                                </td>
                                <td>
                                    <table cellpadding="0" cellspacing="0" >
                                        <tr>
                                            <td>@Html.TextBoxFor(model => model.nAnioAct, new { style = "width:20px;", maxlength = 2 })</td>
                                            <td>Año(s)</td>
                                            <td>&nbsp;</td>
                                            <td>@Html.TextBoxFor(model => model.nMesAct, new { style = "width:20px;", maxlength = 2 })</td>
                                            <td>Mes(es)</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div id="divDatosConvo"></div>
                    </td>
                </tr>
            </tbody>
        </table>
    </fieldset>
<br />
<fieldset style="width: 750px;" class="fieldsetStyle1">
    <legend class="tituloBlue9">DATOS DEL SOLICITANTElcabrera</legend>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tbody class="tituloCelesteN8">
            <tr align="center">
                <td>País Emisor<span class="asterisco">(*)</span></td>
                <td>Tipo documento<span class="asterisco">(*)</span></td>
                <td>Número documento<span class="asterisco">(*)</span></td>
                <td>Nombre del Solicitante<span class="asterisco">(*)</span></td>
                <td>Editar</td>
                <td>&nbsp;</td>
                <td>Nuevo</td>
            </tr>
            <tr align="center">
                <td>@Html.DropDownList("nIdeCodPaisDocSol", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor)</td>
                <td>@Html.DropDownList("nIdeTipoDocumSol", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--")</td>
                <td>@Html.TextBox("vNumDocumSol", null, new { style = "width:100px;", maxlength = 10 })</td>
                <td>@Html.TextBox("vNombresSol", null, new { style = "width:350px;", maxlength = 120 })@Html.HiddenFor(model => model.nIdePersonSolicita)</td>
                <td><img src="@Url.Content("~/images/editar.png")" class="lupita2" alt="EDITAR PERSONA" onclick="javascript:editarDatosPersonaMante(this,'','1');"/></td>
                <td>&nbsp;</td>
                <td><img src="@Url.Content("~/images/newPerson.jpg")" class="lupita2"  alt="AGREGAR PERSONA" onclick="javascript: regPersonaNaturalPop('1',this);" /></td>
            </tr>
    </tbody>
    </table>
</fieldset>
     <table border="0" cellpadding="5" cellspacing="0" style="width:780px;">
        <tr>
            <td width="20%"><b>Campo Obligatorio:</b>&nbsp;<span class="asterisco">(*)</span></td>
            <td width="80%" align="center"><input type="button" value="Registrar Solicitud" onclick="javascript: addNuevaSolicitudFinal(this.form,'@clase');" /></td>
        </tr>
    </table>
        
        @Html.HiddenFor(model => model.nIdeDepSolicitud, new { Value = @Session["nIdeDep"] })
        @Html.HiddenFor(model => model.nTipoSolicitud, new { @Value = 1 })
        @Html.HiddenFor(model => model.nIdeEstadoSol, new { @Value = 1 })
        @Html.HiddenFor(model => model.nIdeUsuReg, new { Value = @Session["nIdeUsuario"] })
        @Html.HiddenFor(model => model.nIdeFuncionario, new { Value = @Session["nIdeFuncionario"] })
        @Html.HiddenFor(model => model.nIdeOrigenSol, new { @Value = 1 })

        @Html.HiddenFor(model => model.nIdePrioridad, new { @Value = 1 })
        @Html.HiddenFor(model => model.nIdePlazo, new { @Value = 1 })     
          
        @Html.HiddenFor(model => model.vAsunto, new { @Value = "SOLICITUD DE BECA SOCIAL" }) 
     }        
</center>
